Patent Literature 1 (Japanese Patent Application Publication No. 2013-138069) discloses a semiconductor device in which a semiconductor structure that operates as an IGBT (Insulated Gate Bipolar Transistor) and a semiconductor structure that operates as a diode are provided in a same semiconductor substrate. In this semiconductor device, the diode operates as a free wheeling diode and protects the IGBT. According to the semiconductor device having the IGBT and the diode provided in the same semiconductor substrate (referred to as an RC-IGBT (Reverse Conducting Insulated Gate Bipolar Transistor) in the present specification), the device can be made more compact in comparison with the conventional art which provides the IGBT and the diode in separate semiconductor substrates.